<?php if(!defined('BASEPATH'))exit('No direct script access allowed'); ?>
<?php $this->load->view('admin/global/header'); ?>
<?php $this->load->view('admin/global/left'); ?>
<table cellpadding="0" cellspacing="0">
    <tr>
        <td class="title"><?php if(isset($group)){echo lang('EDIT').': '.lang('GROUP');}else{echo lang('ADD').': '.lang('GROUP');} ?></td>
    </tr>
    <?php if(isset($denied)){ ?>
    <tr>
        <td class="bar">
            <div class="error"><?php echo lang('DENIED'); ?></div>
            <meta http-equiv="refresh" content="5; <?php echo base_url().ADMIN_PATH; ?>" />
        </td>
    </tr>
    <?php }else{ ?>
    <?php if($success == true){ ?>
    <tr>
        <td class="bar">
            <div class="success"><?php echo lang('SUCCESS_UPDATED_DATA'); ?></div>
            <meta http-equiv="refresh" content="1" />
        </td>
    </tr>
    <?php }else{ ?>
    <?php echo Modules::run('admin/bar_module/index', $buttons); ?>
    <tr>
        <td valign="top">
        <form name="frmPost" id="frmPost" method="post">
            <table class="form" align="center" cellpadding="0" cellspacing="0">
                <tr>
                    <td class="label"><span class="red">*</span> <?php echo lang('GROUP'); ?>:</td>
                    <td>
                        <input type="text" name="txtName" class="input" value="<?php if(isset($group)){echo set_value('txtName', $group->groName);}else{echo set_value('txtName');} ?>" />
                        <?php echo form_error('txtName'); ?>
                    </td>
                </tr>
                <tr>
                    <td class="label" style="padding-top:220px;"><span class="red">*</span> <?php echo lang('PERMISSION'); ?>:</td>
                    <td>
                        <table width="auto" align="left" cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="110"></td>
                                <td width="20">
                                    <input type="checkbox" name="txtFullPermission" id="txtFullPermission" class="checkbox" value="1" <?php if(isset($group) && $group->groPermission == 'FULL'){echo set_checkbox('txtFullPermission', 1, true);}else{echo set_checkbox('txtFullPermission', 1);} ?> />
                                </td>
                                <td>
                                    <span class="red"><b><?php echo lang('FULL_PERMISSION'); ?></b></span>
                                </td>
                            </tr>
                        </table>
                        <table id="permission" width="auto" align="left" cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="110"><b><?php echo lang('GROUP'); ?>:</b></td>
                                <td width="20">
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(GROUPVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(GROUPVIEW)}') != false){echo set_checkbox('txtPermission', '{(GROUPVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(GROUPVIEW)}');} ?> />
                                </td>
                                <td width="47"><b><?php echo lang('VIEW'); ?></b></td>
                                <td width="20">
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(GROUPUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(GROUPUPDATE)}') != false){echo set_checkbox('txtPermission', '{(GROUPUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(GROUPUPDATE)}');} ?> />
                                </td>
                                <td width="70"><b><?php echo lang('UPDATE'); ?></b></td>
                                <td width="20">
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(GROUPDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(GROUPDELETE)}') != false){echo set_checkbox('txtPermission', '{(GROUPDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(GROUPDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('MEMBER'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(USERVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(USERVIEW)}') != false){echo set_checkbox('txtPermission', '{(USERVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(USERVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(USERUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(USERUPDATE)}') != false){echo set_checkbox('txtPermission', '{(USERUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(USERUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(USERDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(USERDELETE)}') != false){echo set_checkbox('txtPermission', '{(USERDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(USERDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('SECTION'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(SECTIONVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(SECTIONVIEW)}') != false){echo set_checkbox('txtPermission', '{(SECTIONVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(SECTIONVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(SECTIONUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(SECTIONUPDATE)}') != false){echo set_checkbox('txtPermission', '{(SECTIONUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(SECTIONUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(SECTIONDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(SECTIONDELETE)}') != false){echo set_checkbox('txtPermission', '{(SECTIONDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(SECTIONDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('CATEGORY'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(CATEGORYVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(CATEGORYVIEW)}') != false){echo set_checkbox('txtPermission', '{(CATEGORYVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(CATEGORYVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(CATEGORYUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(CATEGORYUPDATE)}') != false){echo set_checkbox('txtPermission', '{(CATEGORYUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(CATEGORYUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(CATEGORYDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(CATEGORYDELETE)}') != false){echo set_checkbox('txtPermission', '{(CATEGORYDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(CATEGORYDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('PROVINCE'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(PROVINCEVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(PROVINCEVIEW)}') != false){echo set_checkbox('txtPermission', '{(PROVINCEVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(PROVINCEVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(PROVINCEUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(PROVINCEUPDATE)}') != false){echo set_checkbox('txtPermission', '{(PROVINCEUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(PROVINCEUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(PROVINCEDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(PROVINCEDELETE)}') != false){echo set_checkbox('txtPermission', '{(PROVINCEDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(PROVINCEDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('PRODUCT'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(PRODUCTVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(PRODUCTVIEW)}') != false){echo set_checkbox('txtPermission', '{(PRODUCTVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(PRODUCTVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(PRODUCTUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(PRODUCTUPDATE)}') != false){echo set_checkbox('txtPermission', '{(PRODUCTUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(PRODUCTUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(PRODUCTDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(PRODUCTDELETE)}') != false){echo set_checkbox('txtPermission', '{(PRODUCTDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(PRODUCTDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('ADS'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(ADSVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(ADSVIEW)}') != false){echo set_checkbox('txtPermission', '{(ADSVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(ADSVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(ADSUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(ADSUPDATE)}') != false){echo set_checkbox('txtPermission', '{(ADSUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(ADSUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(ADSDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(ADSDELETE)}') != false){echo set_checkbox('txtPermission', '{(ADSDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(ADSDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('JOB'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(JOBVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(JOBVIEW)}') != false){echo set_checkbox('txtPermission', '{(JOBVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(JOBVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(JOBUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(JOBUPDATE)}') != false){echo set_checkbox('txtPermission', '{(JOBUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(JOBUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(JOBDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(JOBDELETE)}') != false){echo set_checkbox('txtPermission', '{(JOBDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(JOBDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('EMPLOY'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(EMPLOYVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(EMPLOYVIEW)}') != false){echo set_checkbox('txtPermission', '{(EMPLOYVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(EMPLOYVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(EMPLOYUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(EMPLOYUPDATE)}') != false){echo set_checkbox('txtPermission', '{(EMPLOYUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(EMPLOYUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(EMPLOYDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(EMPLOYDELETE)}') != false){echo set_checkbox('txtPermission', '{(EMPLOYDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(EMPLOYDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('NEWS'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(NEWSVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(NEWSVIEW)}') != false){echo set_checkbox('txtPermission', '{(NEWSVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(NEWSVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(NEWSUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(NEWSUPDATE)}') != false){echo set_checkbox('txtPermission', '{(NEWSUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(NEWSUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(NEWSDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(NEWSDELETE)}') != false){echo set_checkbox('txtPermission', '{(NEWSDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(NEWSDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('SHOP'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(SHOPVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(SHOPVIEW)}') != false){echo set_checkbox('txtPermission', '{(SHOPVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(SHOPVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(SHOPUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(SHOPUPDATE)}') != false){echo set_checkbox('txtPermission', '{(SHOPUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(SHOPUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(SHOPDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(SHOPDELETE)}') != false){echo set_checkbox('txtPermission', '{(SHOPDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(SHOPDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('CART'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(CARTVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(CARTVIEW)}') != false){echo set_checkbox('txtPermission', '{(CARTVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(CARTVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(CARTUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(CARTUPDATE)}') != false){echo set_checkbox('txtPermission', '{(CARTUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(CARTUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(CARTDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(CARTDELETE)}') != false){echo set_checkbox('txtPermission', '{(CARTDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(CARTDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('GUIDE'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(GUIDEVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(GUIDEVIEW)}') != false){echo set_checkbox('txtPermission', '{(GUIDEVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(GUIDEVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(GUIDEUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(GUIDEUPDATE)}') != false){echo set_checkbox('txtPermission', '{(GUIDEUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(GUIDEUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(GUIDEDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(GUIDEDELETE)}') != false){echo set_checkbox('txtPermission', '{(GUIDEDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(GUIDEDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('INFO'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(INFOVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(INFOVIEW)}') != false){echo set_checkbox('txtPermission', '{(INFOVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(INFOVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(INFOUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(INFOUPDATE)}') != false){echo set_checkbox('txtPermission', '{(INFOUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(INFOUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(INFODELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(INFODELETE)}') != false){echo set_checkbox('txtPermission', '{(INFODELETE)}', true);}else{echo set_checkbox('txtPermission', '{(INFODELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('NOTICE'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(NOTICEVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(NOTICEVIEW)}') != false){echo set_checkbox('txtPermission', '{(NOTICEVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(NOTICEVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(NOTICEUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(NOTICEUPDATE)}') != false){echo set_checkbox('txtPermission', '{(NOTICEUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(NOTICEUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(NOTICEDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(NOTICEDELETE)}') != false){echo set_checkbox('txtPermission', '{(NOTICEDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(NOTICEDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('CONTACT'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(CONTACTVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(CONTACTVIEW)}') != false){echo set_checkbox('txtPermission', '{(CONTACTVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(CONTACTVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(CONTACTUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(CONTACTUPDATE)}') != false){echo set_checkbox('txtPermission', '{(CONTACTUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(CONTACTUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(CONTACTDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(CONTACTDELETE)}') != false){echo set_checkbox('txtPermission', '{(CONTACTDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(CONTACTDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('FRIEND'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(FRIENDVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(FRIENDVIEW)}') != false){echo set_checkbox('txtPermission', '{(FRIENDVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(FRIENDVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(FRIENDUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(FRIENDUPDATE)}') != false){echo set_checkbox('txtPermission', '{(FRIENDUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(FRIENDUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(FRIENDDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(FRIENDDELETE)}') != false){echo set_checkbox('txtPermission', '{(FRIENDDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(FRIENDDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('CHAT'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(CHATVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(CHATVIEW)}') != false){echo set_checkbox('txtPermission', '{(CHATVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(CHATVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(CHATUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(CHATUPDATE)}') != false){echo set_checkbox('txtPermission', '{(CHATUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(CHATUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(CHATDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(CHATDELETE)}') != false){echo set_checkbox('txtPermission', '{(CHATDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(CHATDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                                <td></td>
                                <td></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('MESSAGE'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(MESSAGEVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(MESSAGEVIEW)}') != false){echo set_checkbox('txtPermission', '{(MESSAGEVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(MESSAGEVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(MESSAGEDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(MESSAGEDELETE)}') != false){echo set_checkbox('txtPermission', '{(MESSAGEDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(MESSAGEDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                                <td></td>
                                <td></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('BANNER'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(BANNERVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(BANNERVIEW)}') != false){echo set_checkbox('txtPermission', '{(BANNERVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(BANNERVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(BANNERUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(BANNERUPDATE)}') != false){echo set_checkbox('txtPermission', '{(BANNERUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(BANNERUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(BANNERDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(BANNERDELETE)}') != false){echo set_checkbox('txtPermission', '{(BANNERDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(BANNERDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('MEDIA'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(MEDIAVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(MEDIAVIEW)}') != false){echo set_checkbox('txtPermission', '{(MEDIAVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(MEDIAVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(MEDIAUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(MEDIAUPDATE)}') != false){echo set_checkbox('txtPermission', '{(MEDIAUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(MEDIAUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(MEDIADELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(MEDIADELETE)}') != false){echo set_checkbox('txtPermission', '{(MEDIADELETE)}', true);}else{echo set_checkbox('txtPermission', '{(MEDIADELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('STATIS'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(STATISVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(STATISVIEW)}') != false){echo set_checkbox('txtPermission', '{(STATISVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(STATISVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(STATISDELETE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(STATISDELETE)}') != false){echo set_checkbox('txtPermission', '{(STATISDELETE)}', true);}else{echo set_checkbox('txtPermission', '{(STATISDELETE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('DELETE'); ?></b></td>
                                <td></td>
                                <td></td>
                            </tr>
                            <tr>
                                <td><b><?php echo lang('SETTING'); ?>:</b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(SETTINGVIEW)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(SETTINGVIEW)}') != false){echo set_checkbox('txtPermission', '{(SETTINGVIEW)}', true);}else{echo set_checkbox('txtPermission', '{(SETTINGVIEW)}');} ?> />
                                </td>
                                <td><b><?php echo lang('VIEW'); ?></b></td>
                                <td>
                                    <input type="checkbox" name="txtPermission[]" class="checkbox" value="{(SETTINGUPDATE)}" <?php if(isset($group) && trim($group->groPermission) != '' && stristr($group->groPermission, '{(SETTINGUPDATE)}') != false){echo set_checkbox('txtPermission', '{(SETTINGUPDATE)}', true);}else{echo set_checkbox('txtPermission', '{(SETTINGUPDATE)}');} ?> />
                                </td>
                                <td><b><?php echo lang('UPDATE'); ?></b></td>
                                <td></td>
                                <td></td>
                            </tr>
                        </table>
                        <?php echo form_error('txtPermission'); ?>
                    </td>
                </tr>
                <tr>
                    <td class="label0"><?php echo lang('ACTIVE'); ?>:</td>
                    <td>
                        <input type="checkbox" name="txtStatus" class="checkbox" value="1" <?php if(isset($group) && (int)$group->groStatus == 1){echo set_checkbox('txtStatus', 1, true);}else{echo set_checkbox('txtStatus', 1);} ?> />
                    </td>
                </tr>
            </table>
        </form>
        </td>
    </tr>
    <?php } ?>
    <?php } ?>
</table>
<?php $this->load->view('admin/global/right'); ?>
<?php $this->load->view('admin/global/footer'); ?>